import request from '@/utils/request'

// 查询听证通知书列表
export function listNotification(query) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/list',
    method: 'get',
    params: query,
  })
}

// 查询听证通知书审批详细
export function getNotification(id) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/' + id,
    method: 'get',
  })
}

// 新增听证通知书审批
export function addNotification(data) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc',
    method: 'post',
    data: data,
  })
}

// 修改听证通知书审批
export function updateNotification(data) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc',
    method: 'put',
    data: data,
  })
}

// 删除听证通知书审批
export function delNotification(id) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/' + id,
    method: 'delete',
  })
}

// 预览

export function previewNotification(params) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/preview',
    method: 'get',
    params,
  })
}

export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addNotificationFiles(data) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportNotification(data) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 导出送达回证
export function receipEexportNotification(data) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/receipEexport',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 导出听证公告
export function exportNotification2(data) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/exportNotice',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/caseList',
    method: 'get',
  })
}

export function getContent(id) {
  return request({
    url: '/ruoyi-system/hearingnoticedoc/getContent?caseId=' + id,
    method: 'get',
  })
}
